import http from "@/api/axios";

export const getListApi = (data: ClientAddressManagement.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/customer/pickup/address/page",
    data
  });
};
export const addPickupAddressApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/pickup/address",
    data
  });
};
export const enabledPickupAddressApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/customer/pickup/address/enabled",
    data
  });
};
export const disabledPickupAddressApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/customer/pickup/address/disabled",
    data
  });
};
export const deletePickupAddressApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/customer/pickup/address",
    data
  });
};
export const modifyPickupAddressApi = (data: Base.GeneraDataType) => {
  return http({
    method: "put",
    url: "/base/biz/customer/pickup/address",
    data
  });
};
// 获取 非FBA收件地址
export const getNoFbaAddressListApi = (data: ClientAddressManagement.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/customer/delivery/address/page",
    data
  });
};
// 新增非FBA收件地址
export const addNoFbaAddressApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/delivery/address",
    data
  });
};
// 编辑
export const modifyNoFbaAddressApi = (data: Base.GeneraDataType) => {
  return http({
    method: "put",
    url: "/base/biz/customer/delivery/address",
    data
  });
};
// 删除
export const deleteNoFbaAddressApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/customer/delivery/address",
    data
  });
};
// 启用
export const enabledNoFbaAddressApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/customer/delivery/address/enabled",
    data
  });
};
// 禁用
export const disabledNoFbaAddressApi = (data: { id: string }) => {
  return http({
    method: "put",
    url: "/base/biz/customer/delivery/address/disabled",
    data
  });
};
